package org.keyuan.struts1.form.converter;

import org.apache.commons.beanutils.Converter;
import org.keyuan.entity.OrderState;
import org.keyuan.entity.util.ImgShowLocal;

public class ImgShowLocalConverter implements Converter{
	@Override
	public Object convert(Class type, Object value) {
		if (type == String.class) {
			return value.toString();
		}
		if (type == ImgShowLocal.class) {
			try {
				return ImgShowLocal.valueOf(value.toString());
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return null;
}
}
